package com.ysh.spring.redirect.controller;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 袁胜虎 on 2022/8/30 11:51
 */
@Controller
@RequestMapping("/test2")
public class Test2Controller {
    @RequestMapping("/test1")
    public String test1(){
        System.err.println("Test2Controller中的方法test1执行了!!!");
        return "redirect:http://www.baidu.com";
    }

}
